class OrderBuyModel {
  int errno;
  Data data;
  String errmsg;

  OrderBuyModel({this.errno, this.data, this.errmsg});

  OrderBuyModel.fromJson(Map<String, dynamic> json) {
    errno = json['errno'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
    errmsg = json['errmsg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errno'] = this.errno;
    if (this.data != null) {
      data['data'] = this.data.toJson();
    }
    data['errmsg'] = this.errmsg;
    return data;
  }
}

class Data {
  Order order;

  Data({this.order});

  Data.fromJson(Map<String, dynamic> json) {
    order = json['order'] != null ? new Order.fromJson(json['order']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.order != null) {
      data['order'] = this.order.toJson();
    }
    return data;
  }
}

class Order {
  List<Uncomment> uncomment;
  List<Uncomment> unpaid;
  List<Uncomment> unship;

  Order({this.uncomment, this.unpaid, this.unship});

  Order.fromJson(Map<String, dynamic> json) {
    if (json['uncomment'] != null) {
      uncomment = new List<Uncomment>();
      json['uncomment'].forEach((v) {
        uncomment.add(new Uncomment.fromJson(v));
      });
    }
    if (json['unpaid'] != null) {
      unpaid = new List<Uncomment>();
      json['unpaid'].forEach((v) {
        unpaid.add(new Uncomment.fromJson(v));
      });
    }
    if (json['unship'] != null) {
      unship = new List<Null>();
      json['unship'].forEach((v) {
        unship.add(new Uncomment.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.uncomment != null) {
      data['uncomment'] = this.uncomment.map((v) => v.toJson()).toList();
    }
    if (this.unpaid != null) {
      data['unpaid'] = this.unpaid.map((v) => v.toJson()).toList();
    }
    if (this.unship != null) {
      data['unship'] = this.unship.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Uncomment {
  int id;
  int userId;
  String text;
  Goods goods;
  String orderSn;
  int orderStatus;
  String consignee;
  String mobile;
  String address;
  String message;
  double goodsPrice;
  double freightPrice;
  double couponPrice;
  double integralPrice;
  double grouponPrice;
  double orderPrice;
  double actualPrice;
  int comments;
  String endTime;
  String addTime;
  String updateTime;
  bool deleted;

  Uncomment(
      {this.id,
      this.userId,
      this.text,
      this.goods,
      this.orderSn,
      this.orderStatus,
      this.consignee,
      this.mobile,
      this.address,
      this.message,
      this.goodsPrice,
      this.freightPrice,
      this.couponPrice,
      this.integralPrice,
      this.grouponPrice,
      this.orderPrice,
      this.actualPrice,
      this.comments,
      this.endTime,
      this.addTime,
      this.updateTime,
      this.deleted});

  Uncomment.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    userId = json['userId'];
    text = json['text'];
    goods = json['goods'] != null ? new Goods.fromJson(json['goods']) : null;
    orderSn = json['orderSn'];
    orderStatus = json['orderStatus'];
    consignee = json['consignee'];
    mobile = json['mobile'];
    address = json['address'];
    message = json['message'];
    goodsPrice = json['goodsPrice'];
    freightPrice = json['freightPrice'];
    couponPrice = json['couponPrice'];
    integralPrice = json['integralPrice'];
    grouponPrice = json['grouponPrice'];
    orderPrice = json['orderPrice'];
    actualPrice = json['actualPrice'];
    comments = json['comments'];
    endTime = json['endTime'];
    addTime = json['addTime'];
    updateTime = json['updateTime'];
    deleted = json['deleted'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['userId'] = this.userId;
    data['text'] = this.text;
    if (this.goods != null) {
      data['goods'] = this.goods.toJson();
    }
    data['orderSn'] = this.orderSn;
    data['orderStatus'] = this.orderStatus;
    data['consignee'] = this.consignee;
    data['mobile'] = this.mobile;
    data['address'] = this.address;
    data['message'] = this.message;
    data['goodsPrice'] = this.goodsPrice;
    data['freightPrice'] = this.freightPrice;
    data['couponPrice'] = this.couponPrice;
    data['integralPrice'] = this.integralPrice;
    data['grouponPrice'] = this.grouponPrice;
    data['orderPrice'] = this.orderPrice;
    data['actualPrice'] = this.actualPrice;
    data['comments'] = this.comments;
    data['endTime'] = this.endTime;
    data['addTime'] = this.addTime;
    data['updateTime'] = this.updateTime;
    data['deleted'] = this.deleted;
    return data;
  }
}

class Goods {
  int id;
  int orderId;
  int goodsId;
  String goodsName;
  String goodsSn;
  int productId;
  int number;
  double price;
  List<String> specifications;
  String picUrl;
  int comment;
  String addTime;
  String updateTime;
  bool deleted;

  Goods(
      {this.id,
      this.orderId,
      this.goodsId,
      this.goodsName,
      this.goodsSn,
      this.productId,
      this.number,
      this.price,
      this.specifications,
      this.picUrl,
      this.comment,
      this.addTime,
      this.updateTime,
      this.deleted});

  Goods.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    orderId = json['orderId'];
    goodsId = json['goodsId'];
    goodsName = json['goodsName'];
    goodsSn = json['goodsSn'];
    productId = json['productId'];
    number = json['number'];
    price = json['price'];
    specifications = json['specifications'].cast<String>();
    picUrl = json['picUrl'];
    comment = json['comment'];
    addTime = json['addTime'];
    updateTime = json['updateTime'];
    deleted = json['deleted'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['orderId'] = this.orderId;
    data['goodsId'] = this.goodsId;
    data['goodsName'] = this.goodsName;
    data['goodsSn'] = this.goodsSn;
    data['productId'] = this.productId;
    data['number'] = this.number;
    data['price'] = this.price;
    data['specifications'] = this.specifications;
    data['picUrl'] = this.picUrl;
    data['comment'] = this.comment;
    data['addTime'] = this.addTime;
    data['updateTime'] = this.updateTime;
    data['deleted'] = this.deleted;
    return data;
  }
}